package com.sleuth.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.servlet.http.HttpServletRequest;

@RestController
public class TraceController {

    private static final Logger logger = LoggerFactory.getLogger(TraceController.class);

    @Autowired
    private RestTemplate restTemplate;

    @RequestMapping(value = "/trace",method = RequestMethod.GET)
    public String trace(){

        logger.info("=====Start call Provider trace");

//        String results= restTemplate.getForObject("http://provider-server",String.class);
//
//        logger.info("Return result："+results);

        return "1";
    }

}
